package com.yq.ylmall.cart.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yq.ylmall.cart.service.ICartInfoService;
import com.yq.ylmall.dto.cart.CartInfoQueryDto;
import com.yq.ylmall.model.cart.CartInfo;
import com.yq.ylmall.model.product.ProductUnit;
import com.yq.ylmall.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.RequiredArgsConstructor;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;

@Api(tags = "购物车管理接口")
@RequestMapping("/admin/cart/cartInfo")
@RestController
@RequiredArgsConstructor
public class CartInfoController {
    private final ICartInfoService cartInfoService;

    @PostMapping("/page")
    @ApiModelProperty("购物车分页查询")
    public Result<Object> page(@RequestBody CartInfoQueryDto dto){
        return Result.ok(cartInfoService.queryCartInfo(dto));
    }
}
